return {
  {
    "L3MON4D3/LuaSnip",
    enabled = true,
    version = "v2.*", -- Replace <CurrentMajor> by the latest released major (first number of latest release)
    -- install jsregexp (optional!).
    build = "make install_jsregexp",
    dependencies = {
      "saadparwaiz1/cmp_luasnip",
      "rafamadriz/friendly-snippets",
      { "garymjr/nvim-snippets", enabled = true },
    },
    opts = {
      update_events = "TextChanged,TextChangedI",
      enable_autosnippets = true,
    },
    config = function()
      -- 加载友好代码片段
      local ok, from_vscode = pcall(require, "luasnip.loaders.from_vscode")
      if not ok then
        vim.notify(
          "~/.config/nvim/lua/plugins/snippets.lua: luasnip.loaders.from_vscode not found!",
          vim.log.levels.WARN
        )
      else
        from_vscode.lazy_load()
      end
      local ls = require("luasnip")
      vim.keymap.set({ "i" }, "<C-K>", function()
        ls.expand()
      end, { silent = true })
      vim.keymap.set({ "i", "s" }, "<C-L>", function()
        ls.jump(1)
      end, { silent = true })
      vim.keymap.set({ "i", "s" }, "<C-J>", function()
        ls.jump(-1)
      end, { silent = true })
      vim.keymap.set({ "i", "s" }, "<C-E>", function()
        if ls.choice_active() then
          ls.change_choice(1)
        end
      end, { silent = true })
    end,
  },
}
